﻿<Window x:Class="ExpressionTreeTests.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Expression Tree Tests" Height="768" Width="1024"
        >
    <DockPanel>
        <Menu DockPanel.Dock="Top">
            <MenuItem Header="_Binary Expressions">
                <MenuItem Header="_Arithmetic Operations">
                    <MenuItem Name="mnuArithmeticExpressions" Header="_Arithmetic Expressions" Click="mnuArithmeticExpressions_Click" />
                    <MenuItem Name="mnuCheckedExpressions" Header="Chec_ked Expressions" Click="mnuCheckedExpressions_Click" />
                    <MenuItem Name="mnuPowerAndModuloExpressions" Header="_Power &amp; Modulo Expressions" Click="mnuPowerAndModuloExpressions_Click" />
                </MenuItem>
                <MenuItem Name="mnuBitwiseOperations" Header="_Bitwise Operations" Click="mnuBitwiseOperations_Click" />
                <MenuItem Name="mnuShiftOperations" Header="_Shift Operations" Click="mnuShiftOperations_Click" />
                <MenuItem Name="mnuConditionalBooleanOperations" Header="_Conditional Boolean Operations" Click="mnuConditionalBooleanOperations_Click" />
                <MenuItem Name="mnuComparisonOperations" Header="Co_mparison Operations" Click="mnuComparisonOperations_Click" />
                <MenuItem Name="mnuCoalescingOperations" Header="Coalescin_g Operations" Click="mnuCoalescingOperations_Click" />
                <MenuItem Name="mnuArrayIndexingOperations" Header="A_rray Indexing Operations" Click="mnuArrayIndexingOperations_Click" />
            </MenuItem>
            <MenuItem Header="_Unary Expressions">
                <MenuItem Name="mnuArrayLength" Header="_Array Length" Click="mnuArrayLength_Click" />
                <MenuItem Name="mnuConvertExpression" Header="_Convert Expression" Click="mnuConvertExpression_Click" />
                <MenuItem Name="mnuConvertChecked" Header="Convert Chec_ked" Click="mnuConvertChecked_Click" />
                <MenuItem Name="mnuNegate" Header="_Negate" Click="mnuNegate_Click" />
                <MenuItem Name="mnuNegateChecked" Header="Ne_gate Checked" Click="mnuNegateChecked_Click" />
                <MenuItem Name="mnuNotExpression" Header="N_ot Expression" Click="mnuNotExpression_Click" />
                <MenuItem Name="mnuTypeAs" Header="_Type As" Click="mnuTypeAs_Click" />
            </MenuItem>
            <MenuItem Header="_Array Expressions">
                <MenuItem Name="mnuNewArrayBounds" Header="New Array _Bounds" Click="mnuNewArrayBounds_Click" />
                <MenuItem Name="mnuNewArrayInit" Header="New Array _Init" Click="mnuNewArrayInit_Click" />
            </MenuItem>
            <MenuItem Header="_Member Expressions">
                <MenuItem Header="_Member Expression">
                    <MenuItem Name="mnuFieldAccess" Header="_Field Access" Click="mnuFieldAccess_Click" />
                    <MenuItem Name="mnuPropertyAccess" Header="_Property Access" Click="mnuPropertyAccess_Click" />
                </MenuItem>
                <MenuItem Name="mnuMemberInitialization" Header="Member _Initialization" Click="mnuMemberInitialization_Click" />
            </MenuItem>
            <MenuItem Header="_Other Expressions">
                <MenuItem Name="mnuConditionalExpression" Header="_Conditional Expression" Click="mnuConditionalExpression_Click" />
                <MenuItem Name="mnuConstantExpression" Header="Con_stant Expression" Click="mnuConstantExpression_Click" />
                <MenuItem Name="mnuInvocationExpression" Header="_Invocation Expression" Click="mnuInvocationExpression_Click" />
                <MenuItem Name="mnuLambdaExpression" Header="_Lambda Expression" Click="mnuLambdaExpression_Click" />
                <MenuItem Name="mnuListInitialization" Header="Lis_t Initialization" Click="mnuListInitialization_Click" />
                <MenuItem Name="mnuMethodCall" Header="_Method Call" Click="mnuMethodCall_Click" />
                <MenuItem Name="mnuNewExpression" Header="_New Expression" Click="mnuNewExpression_Click" />
                <MenuItem Name="mnuParameterExpression" Header="_Parameter Expression" Click="mnuParameterExpression_Click" />
                <MenuItem Name="mnuTypeBinaryExpression" Header="Type _Binary Expression" Click="mnuTypeBinaryExpression_Click" />
            </MenuItem>
            <MenuItem Header="_Some Expression" Name="mnuSomeExpression" Click="mnuSomeExpression_Click" />
        </Menu>
        <DockPanel DockPanel.Dock="Left">
            <GroupBox DockPanel.Dock="Top" Name="DirectionGroup" BorderThickness="0">
                <StackPanel>
                    <RadioButton Name="TopToBottomButton" Content="_Top to Bottom" IsChecked="True" />
                    <RadioButton Name="LeftToRightButton" Content="_Left to Right" IsChecked="False" />
                    <RadioButton Name="RightToLeftButton" Content="_Right to Left" IsChecked="False" />
                    <RadioButton Name="BottomToTopButton" Content="Bottom to To_p" IsChecked="False" />
                </StackPanel>
            </GroupBox>
            <Slider Name="ZoomSlider" 
                    Minimum="0.5" Maximum="5" Value="1" 
                    TickFrequency="0.5" TickPlacement="BottomRight" IsSnapToTickEnabled="True"
                    Orientation="Vertical" />
        </DockPanel>
        <DockPanel>
            <TextBlock Name="ExpressionText" DockPanel.Dock="Top" TextAlignment="Center" />
            <Grid Name="ExpressionTreeGrid">
                <Grid.LayoutTransform>
                    <ScaleTransform
                        ScaleX="{Binding ElementName=ZoomSlider, Path=Value}"
                        ScaleY="{Binding ElementName=ZoomSlider, Path=Value}"
                        />
                </Grid.LayoutTransform>
            </Grid>
        </DockPanel>
    </DockPanel>
</Window>
